using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace XiaoMan.Model.Models.Mapping
{
    public class Forum_TipoffMap : EntityTypeConfiguration<Forum_Tipoff>
    {
        public Forum_TipoffMap()
        {
            // Primary Key
            this.HasKey(t => t.TipoffID);

            // Properties
            this.Property(t => t.TipoffID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.Reason)
                .HasMaxLength(50);

            this.Property(t => t.ResultDescription)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Forum_Tipoff");
            this.Property(t => t.TipoffID).HasColumnName("TipoffID");
            this.Property(t => t.TopicID).HasColumnName("TopicID");
            this.Property(t => t.UserID).HasColumnName("UserID");
            this.Property(t => t.Reason).HasColumnName("Reason");
            this.Property(t => t.Result).HasColumnName("Result");
            this.Property(t => t.ResultDescription).HasColumnName("ResultDescription");
            this.Property(t => t.CreateTime).HasColumnName("CreateTime");
        }
    }
}
